Klasse DifferencesPDFPresenter
java.lang.Object
com.inet.pdfc.presenter.BasePresenter
com.inet.pdfc.presenter.ExportPresenter
com.inet.pdfc.presenter.ExportFilePresenter
com.inet.pdfc.presenter.DifferencesPDFPresenter
- Alle implementierten Schnittstellen:
NamedExtension, Cloneable
This presenter creates a complete comparison PDF for any comparison. The PDF contains all pages of both documents
along with a highlighting of all differences. The visual representation is similar to the one of the i-net PDFC GUI.
NOTE: In case you want to redirect the output to a non-file destination, please overwrite the
NOTE: In case you want to redirect the output to a non-file destination, please overwrite the
getExportStream() method.- Seit:
- i-net PDFC 3.0
-
Verschachtelte Klassen - Übersicht
Von Klasse geerbte verschachtelte Klassen/Schnittstellen ExportFilePresenter
ExportFilePresenter.HasPrintRangeVon Klasse geerbte verschachtelte Klassen/Schnittstellen BasePresenter
BasePresenter.ERROR_SOURCE -
Feldübersicht
Von Klasse geerbte Felder ExportPresenter
PAINT_BOTH, PAINT_LEFT, PAINT_RIGHTVon Klasse geerbte Felder BasePresenter
LOGGER, MAX_FILENAME_LENGTH -
Konstruktorübersicht
KonstruktorenModifikatorKonstruktorBeschreibungprotectedShortcut to better support spawn for extended classesDifferencesPDFPresenter(File rootFolder) Creates the presenterDifferencesPDFPresenter(File target, boolean isFolder) Creates the presenterDifferencesPDFPresenter(OutputStream customStream) Creates the presenter.
CAUTION: Since only a single stream is passed here, this instance must be used only for a single comparison! -
Methodenübersicht
Modifikator und TypMethodeBeschreibungprotected OutputStreamOpens an returns an output stream for the result of the currentBasePresenter.getModel().protected StringGet the extension of the target fileReturns the UNIQUE name of the extension.voidCreates the actual result PDF Called to indicate that a comparison has finished.voidsetPagelayout(int pageWidth, int pageHeight, int marginLeft, int marginTop, int marginRight, int marginBottom) Set the desired pageLayout for the pdf to render.voidsetPassword(String password) Set the password for the exported filevoidsetReplaceSystemFonts(boolean replace) Sets whether system font references should be replaced by embedded PDF default fonts.spawn(boolean spawnWithParent) Creates another presenter of the the same type as the current one.Von Klasse geerbte Methoden ExportFilePresenter
applyPrintRange, configure, setModel, setPrintRangeVon Klasse geerbte Methoden ExportPresenter
createAndSetupPrintPainter, setBackgroundColor, setOverlapAlpha, setPaintOverlap, setPaintSidesVon Klasse geerbte Methoden BasePresenter
canInformUserOnErrors, createExportFilename, detachFromModel, executeImmediately, getDefaultExportName, getLastPresenterException, getModel, getParent, getPresenterExceptions, onClear, onDataUpdate, onError, onFilterChange, onFinish, onInit, onProgressUpdate, setParent
-
Konstruktordetails
-
DifferencesPDFPresenter
Creates the presenter- Parameter:
rootFolder- the folder to store the comparison results to.- Löst aus:
IllegalStateException- in case there is no 'reporting' plugin available- Seit:
- i-net PDFC 3.0
-
DifferencesPDFPresenter
Creates the presenter- Parameter:
target- the folder or file to store the comparison results to.isFolder- if the target is a folder or a file- Löst aus:
IllegalStateException- in case there is no 'reporting' plugin available- Seit:
- i-net PDFC 4.3
-
DifferencesPDFPresenter
Creates the presenter.
CAUTION: Since only a single stream is passed here, this instance must be used only for a single comparison! If used for a batch comparison all created PDFs will be written to this stream without further notice.- Parameter:
customStream- the stream to export to.- Seit:
- i-net PDFC 5.0
-
DifferencesPDFPresenter
Shortcut to better support spawn for extended classes- Löst aus:
IllegalStateException- thrown if there is no active 'reporting' plugin available- Seit:
- i-net PDFC 4.0
-
-
Methodendetails
-
getExtensionName
Returns the UNIQUE name of the extension. With UNIQUE referring to 'unique among all implementations of the same interface'- Gibt zurück:
- the UNIQUE name of the extension
-
spawn
Creates another presenter of the the same type as the current one. The spawned presenter may either have the same settings as the current one or it may be a child of the current one.- Setzt außer Kraft:
spawnin KlasseBasePresenter- Parameter:
spawnWithParent- if true, the presenter is allowed to keep a reference to it's parent to create a summary on onFinish()- Gibt zurück:
- a new presenter for the same batch comparison run as the current one
-
getExportStream
Opens an returns an output stream for the result of the currentBasePresenter.getModel(). The caller of this method will close the stream itself!- Setzt außer Kraft:
getExportStreamin KlasseExportFilePresenter- Gibt zurück:
- the stream to write the current result to
- Löst aus:
IOException- thrown in case the stream could not be created
-
onComparisonDone
Creates the actual result PDF Called to indicate that a comparison has finished. This does not imply that any page data or differences are available.- Angegeben von:
onComparisonDonein KlasseBasePresenter- Löst aus:
Exception- thrown in case the processing of the finish step fails- Seit:
- i-net PDFC 3.0
-
setPassword
Set the password for the exported file- Parameter:
password- the pdf password, null or empty for no password- Seit:
- i-net PDFC 21.4
-
getExtension
Get the extension of the target file- Angegeben von:
getExtensionin KlasseExportFilePresenter- Gibt zurück:
- the file extension like .pdf or .png
-
setReplaceSystemFonts
public void setReplaceSystemFonts(boolean replace) Sets whether system font references should be replaced by embedded PDF default fonts. E.g. a reference to a 'Arial' font may not work when displayed on Unix. Since some system fonts are not allowed to be embedded, the export will replace them by PDF default fonts like 'Helvetica'. This may result in visual differences but generates a consistent result for any viewer.- Parameter:
replace-trueto replace the fonts,falseto use system font references- Seit:
- i-net PDFC 22.4
-
setPagelayout
public void setPagelayout(int pageWidth, int pageHeight, int marginLeft, int marginTop, int marginRight, int marginBottom) Set the desired pageLayout for the pdf to render.- Parameter:
pageWidth- the desired with in px, including margins.pageHeight- the desired height in px, including margins.marginLeft- margins to apply on the left side in px.marginTop- margins to apply on top of the page in px.marginRight- margins to apply on the right side in px.marginBottom- margins to apply on the bottom side in px.- Seit:
- i-net PDFC 3.0
-